<template>
  <div>
    <div class="w">
      <!-- 轮播图 -->
      <div class="focus">
        <el-carousel trigger="click" height="420px">
          <el-carousel-item v-for="item in focus.value" :key="item">
            <img v-lazy="`http://47.105.157.158:3000/images/focus/${item}`" />
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
  </div>
</template>

<script>
import { inject, ref, onMounted } from "@vue/composition-api";
export default {
  setup() {
    // 轮播图
    const focus = ref(inject("focus"));

    return {
      focus
    };
  }
};
</script>

<style lang="less" scoped>
.focus {
  margin-top: 30px;
}
img {
  width: 100%;
  height: 100%;
}
</style>
